package com.cloudkinto.service.shop;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.ShopDo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.service.shop.vo.ShopAddReq;
import com.cloudkinto.service.shop.vo.ShopPageRes;
import com.cloudkinto.service.shop.vo.ShopUpdateReq;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author 张永远
 * @since 2020-06-01
 */
public interface ShopService extends IService<ShopDo> {

    SingleResult addInit();

    ShopAddReq add(ShopAddReq req, Long userId, Long companyId);

    ShopDo add(ShopDo req);

    SingleResult updateInit(Long id);

    Object update(ShopUpdateReq updateVo, Long userId);

    int delete(Long id, Long userId);

    ShopUpdateReq detail(Long id);

    SingleResult pageInit();

    List<ShopPageRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);


    ShopDo getShopTokenById(long shopId);

    List<Map> selectShopListInit(Long userId, Long companyId);

    List<Map> selectShopListInitByUserId(Long userId);

    boolean setAutoStock(Long companyId, int setFlag);

    int getAutoStock(Long companyId);

    List<Map<String, Object>> getShopList(Long companyId);

    Map<Long, String> getShopListMap(Long companyId);
}
